import 'dart:convert';

import 'package:grocery_app_demo/generated/json/base/json_field.dart';
import 'package:grocery_app_demo/generated/json/goods_list_res_entity.g.dart';

@JsonSerializable()
class GoodsListResEntity {
  late int id;
  late String goodsCode;
  late String barRules;
  late int shipperId;
  late String shipperName;
  late String goodsName;
  late bool materialFlag;
  late String vulgo;
  late int bigClassId;
  late String bigClassName;
  late int middleClassId;
  late String middleClassName;
  late int smallClassId;
  late String smallClassName;
  late int batchRulesId;
  late String tempName;
  late String pricingMode;
  late double standardWeight;
  late String unit;

  GoodsListResEntity();

  factory GoodsListResEntity.fromJson(Map<String, dynamic> json) =>
      $GoodsListResEntityFromJson(json);

  Map<String, dynamic> toJson() => $GoodsListResEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
